package org.sparkle.html.impl.basic;

import org.sparkle.html.api.AbstractHtmlElement;

public class Body extends AbstractHtmlElement {

	private static final long serialVersionUID = -1320813053591753663L;

	/*
	private static ThreadLocal<List<JScript>> scripts=new ThreadLocal<List<JScript>>();
	
	private List<JScript> htmlScript;
	
	public Body() {
		htmlScript=new ArrayList<JScript>();
		scripts.set(htmlScript);
	}
	
	@Override
	public void onAfterRender(String result) {
		scripts.remove();
	}
	
	public static List<JScript> getScripts() {
		//System.out.println("Current thread: "+Thread.currentThread().getId());
		return scripts.get();
	}
	
	@Override
	public String getEndHtml() {		
		if(getScripts()!=null && getScripts().size()>0)
			return new Script(getScripts()).render()+super.getEndHtml();
		return super.getEndHtml();
	}
	*/
}
